import * as API from '../utils/api'

export const LOAD_CONSULTING_LIST = 'LOAD_CONSULTING_LIST'
export const UPDATE_CONSULTING_LIST = 'UPDATE_CONSULTING_LIST'

export const loadConsultingList = function (body) {
    return async function (dispatch)  {
        const list = await API.fetchConsultingList(body)
        dispatch(updateConsultingList({
            ...list
        }))
    }
}
export const updateConsultingList = list => ({type: UPDATE_CONSULTING_LIST, list})